package me.shurufa.net;

import android.os.Build;

/**
 * 网络请求常量
 *
 * request method:Post
 * request format:json/www-url-encode
 * response format:json
 *
 * generic parameter:token/page
 *
 * @FileName: me.shurufa.net.NetworkConstants.java
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-01-14 11:47
 */
public class NetworkConstants {
  // Debug Server
  public static final String BASE_URL = "http://test.api.shurufa.me/";
  // captcha
  public static final String SEND_CAPTCHA = BASE_URL + "captcha/send";
  public static final String VALIDATE_CAPTCHA = BASE_URL + "captcha/validate";
  // user
  public static final String USER_REGISTER = BASE_URL + "user/register";
  public static final String USER_LOGIN = BASE_URL + "user/login";//没有默认用户名 头像
  public static final String USER_EXIST = BASE_URL + "user/exists";
  public static final String USER_PROFILE = BASE_URL + "user/profile";
  public static final String USER_MODIFY_NICKNAME = BASE_URL + "user/modifyNickname";
  public static final String USER_MODIFY_EMAIL = BASE_URL + "user/modifyEmail";
  public static final String USER_MODIFY_PASSWORD = BASE_URL + "user/modifyPassword";
  public static final String USER_MODIFY_AVATAR = BASE_URL + "user/modifyAvatar";//调试无返回值
  public static final String USER_MODIFY_DESCRIPTION = BASE_URL + "user/modifyDescription";
  //upload avatar
  public static final String USER_UPLOAD_AVATAR = "http://image.shurufa.me";

  // comment
  public static final String COMMENT_ADD = BASE_URL + "comment/add";
  //param bookId pageSize page,[bookInfoScrollView has use this api]
  public static final String COMMENT_GET_BY_BOOK = BASE_URL + "comment/getByBookId";
  //param userId pageSzie page,[userInfoScrollView has use this api]
  public static final String COMMENT_GET_BY_USER = BASE_URL + "comment/getByUserId";
  //param userId bookId
  public static final String COMMENT_GET_BY_USER_AND_BOOK = BASE_URL + "comment/getByUserIdAndBookId";
  // digest
  //param bookId,token,page(select) [bookInfoScrollView has use this api]
  public static final String DIGEST_GET_BY_BOOK = BASE_URL + "excerpt/getByBookId";
  public static final String DIGEST_GET_BY_USER = BASE_URL + "excerpt/getByUserId";
  public static final String DIGEST_GET_BY_MENU = BASE_URL + "excerpt/getByMenuId";

  //根据currentID 和
  public static final String FAVOURDIGEST_DIGEST_GET_BY_BOOKID_AND_USERID
          = BASE_URL+"excerpt/getFavoriteExcerptByUserIdAndBookId";
      //param token excerptedBookId
  public static final String MY_DIGEST_GET_BY_BOOK = BASE_URL + "excerpt/getMyExcerptByExcerptedBookId";

  //discover
  public static final String GET_NEW_BOOKS = BASE_URL + "book/getLatest";
  public static final String GET_HOT_USERS = BASE_URL + "user/getHotUsers";


  //bookInfoScrollView
  //param bookId;
  public static final String GET_BOOK_INFO = BASE_URL + "book/basicInfo";



  //Chat
  //token page
  public static final String GET_MY_MESSAGE = BASE_URL + "message/getMyMessages";
  //token message id
  public static final String SET_MY_MESSAGE_HAS_READ = BASE_URL + "message/read";
  //token message id
  public static final String DELETE_MY_MESSAGE = BASE_URL + "message/delete";
  //token
  public static final String GET_MY_MESSAGE_COUNT = BASE_URL + "message/countNew";

  //Search
  public static final String SEARCH_BOOK_BY_KEYWORD = BASE_URL + "book/searchByKeyword";
  public static final String SEARCH_BOOK_BY_ISBN = BASE_URL + "book/getBasicInfoByIsbn";

  //GET FROM SHELVES
  //params userId page withTotal [notice: withTotal and page is selection]
  //点击我收藏的书摘跳转
  public static final String GET_FAVOURITE_BOOK_BY_USER = BASE_URL + "book/getFavoriteBookByUserId";

  public static final String GET_MY_BOOKSHELVES_OF_BOOKS = BASE_URL + "book/getExcerptedBookByUserId";
  //GET FROM FAVOURITE DIGEST OF BOOK
  public static final String GET_FAVOURITE_DIGEST_OF_BOOK_BY_USER = BASE_URL + "book/getFavoriteExcerptedBookByUserId";



  //menu
  //params userId bookId withExcerptTotal
  //withExcerptTotal and userId is selection
  //when withExcerptTotal is 1 userId can use
  //return all digest number or user's digest number for this book
  public static final String GET_BOOK_MENU = BASE_URL + "book/getMenu";

  //get digests by menuid
  //params menuId token
  //showFavoriteInfo：可选。是否获取相关收藏信息
  //page：可选。
  public static final String GET_DIGEST_BY_MENUID = BASE_URL + "excerpt/getByMenuId";

  //get my digests by menuid
  //params token menuId page
  public static final String GET_MY_DIGEST_BY_MENUID = BASE_URL + "excerpt/getMyExcerptByMenuId";

  //params
  //userId
  //page withTotal 统计个数[selection]
  public static final String GET_DIGEST_BOOK_BY_USERID = BASE_URL + "book/getExcerptedBookByUserId";

  public static final String GET_DIGEST_BY_USERID_AND_MENUID = BASE_URL + "excerpt/getByUserIdAndMenuId";


  //params token(currentUser.token) excerptId(digest.id)
  public static final String FAVOURITE_DIGEST = BASE_URL + "excerpt/favorite";
  public static final String UNFAVOURITE_DIGEST = BASE_URL + "excerpt/deleteFavorite";

  //book
  public static final String ADD_BOOK_TO_SHELVES = BASE_URL + "book/addMyExcerptedBook";
  public static final String DELETE_BOOK_TO_SHELVES = BASE_URL + "book/deleteMyExcerptedBook";

  //feedback
  public static final String FEEDBACK = BASE_URL + "feedback/add";

  //ocr
  public static final String READ_TEXT_FROM_IMAGE = BASE_URL + "ocr/readTextFromImage";

  //add
  //params bookId content token type: book|excerpt
  public static final String ADD_COMMENT_FOR_BOOK = BASE_URL + "comment/add";
  public static final String ADD_DIGEST = BASE_URL + "excerpt/add";
  public static final String ADD_MENU = BASE_URL + "book/addMenu";


  //modify
  //param token excerptId content note publishState
  public static final String MODIFY_DIGEST = BASE_URL + "excerpt/modify";
  //remove
  public static final String REMOVE_DIGEST = BASE_URL + "excerpt/delete";
}
